<?php 
     $info=$this->info;
     if (isset($_POST['edit'])==true)
     {
     	$data=$_POST;
     	$comments= new Manager_Model_comments();
     	$comments->save($data);
     	header("location:".$_SERVER['HTTP_REFERER']);
     }
?>
<style>
.comments_1{ color:#1C7DC1; font-weight: bold; font-family: arial; font-size: 12px;}

</style>

<script language="javascript" src="<?php echo JURI.'/ckeditor/ckeditor.js';?>"></script>
<script language="javascript" src="<?php echo JURI.'/ckfinder/ckfinder.js'; ?>"></script>

<div>
<form name="appForm" method="post" action="" id="appForm">
    <h2 style="text-align: center; color: #0389AB;">THÔNG TIN COMMENTS CỦA KHÁCH HÀNG</h2>
    <div style="">
       <div>
            <h3 style="background-color:#F2F2F2; color: #26576F; padding-top: 5px; padding-bottom: 5px; padding-left: 5px;">
                 Thông tin người comments
            </h3>
            <table cellpadding="0" cellspacing="4" border="0" style="margin-left: 20px;">
                <tr>
                    <td><span class="comments_1">Họ tên :</span></td>
                    <td><?php echo $info['0']['name']; ?></td>
                </tr>
                <tr>
                    <td><span class="comments_1">Địa chỉ:</span></td>
                    <td><?php echo $info['0']['address']; ?></td>
                </tr>
                <tr>
                    <td><span class="comments_1">Email:</span></td>
                    <td><?php echo $info['0']['email']; ?></td>
                </tr>
            
            </table>
           
       </div>
       <div style="">
            <h3 style="background-color:#F2F2F2; color: #26576F; padding-top: 5px; padding-bottom: 5px; padding-left: 5px;">Nội dung comments</h3>
            <table style="margin-left: 20px;">
                <tr>
                    <td><span class="comments_1">Tiêu đề:</span> <?php echo $info['0']['title']; ?></td>
                    <td></td>
                </tr>
                <tr>
                    <td colspan="2" align="center"><span class="comments_1">Nội dung:</span></td>
                   
                </tr>
                <tr>
                    <td colspan="2">
                     <textarea name=introtext id=introtext class=txttextbox /> <?php echo $info['0']['fulltext']; ?></textarea>
						<script type="text/javascript">
					             var editor = CKEDITOR.replace( 'introtext',{
					            uiColor : '#9AB8F3',
					            language:'vi',
					            skin:'kama',
					            width:'98%',
					            height:'300',
					            filebrowserImageBrowseUrl : '<?php echo JURI."ckfinder/ckfinder.html?Type=Images";?>',
					            filebrowserFlashBrowseUrl : '<?php echo JURI."ckfinder/ckfinder.html?Type=Flash";?>',
								filebrowserImageUploadUrl : 'ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images',
								filebrowserFlashUploadUrl : 'ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash',
								 	
					            toolbar:[
					            ['Source','-','Save','NewPage','Preview','-','Templates'],
					            ['Cut','Copy','Paste','PasteText','PasteFromWord','-','Print'],
					            ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
					            ['Bold','Italic','Underline','Strike','-','Subscript','Superscript'],
					           
					            ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
					            ['Table','HorizontalRule','Smiley','SpecialChar','PageBreak'],
					            ['Styles','Format','Font','FontSize'],
					            ['TextColor','BGColor'],
					            
					            ]
					        });		
			           </script>
                  </td>
                   
                </tr>
                <tr>
                    <td align="center" colspan="2">
                       <input  onClick="window.close()" type="button" value="Đóng" style="width: 100px; height: 25px; border: none;
                                                                 background-color: #FFCF63; color: #E02727;
                                                                  font-weight:bold; cursor: pointer; ">
                                                                  
                       <input type="submit" value="Edit" name="edit" style="width: 100px; height: 25px; border: none;
                                                                 background-color: #FFCF63; color: #E02727;
                                                                  font-weight:bold; cursor: pointer; ">
                    </td>
                   
                </tr>
            </table>
       </div>
</div>
  <input type="hidden" value="edit">
  <input type="hidden" value="<?php echo $info['0']['id']; ?>" name="id">
</form>
</div>